<template>
  <h3>逻辑复用</h3>
  <input type="text" v-model="value" />
  <button @click="add">添加</button>

  <ul>
    <li v-for="item in list">
      {{ item }}
      <button @click="remove(item)">删除</button>
    </li>
  </ul>
</template>

<script setup>
import useTodo from "@/hooks/useTodo";

const { value, list, add, remove } = useTodo(["张三", "李四"]);
</script>
